package free_practice.work;

import java.util.Scanner;

/**
 * @author fangzhiyi
 * @version 1.0
 * @date 2025/3/22 14:21
 * @description
 */
public class Test {
    public static final Scanner INPUT = new Scanner(System.in);
    public static final Dao dao = new Dao();
    public static void main(String[] args) {

        while (true){
            System.out.println("-----------------------------------------");
            System.out.println("1.查询所有学生的信息");
            System.out.println("2.添加转校生");
            System.out.println("3.对学生的成绩进行修改");
            System.out.println("4.打印成绩优良的学生(成绩>80)");
            System.out.println("5.查询某个科目的老师信息");
            System.out.println("6.打印需要补考的学生(成绩<60),");
            System.out.println("7.根据姓名删除学生并打印删除后的所有学生信息");
            System.out.println("8.退出");
            System.out.println("------------------------------------------");
            System.out.println("请输入你的选择");
            int choice = INPUT.nextInt();
            switch (choice){
                case 1:
                    dao.findStu();
                    break;
                case 2:
                    dao.addStu();
                    break;
                case 3:
                    dao.setScore();
                    break;
                case 4:
                    dao.printScore();
                    break;
                case 5:
                    dao.findTeacher();
                    break;
                case 6:
                    dao.printStu();
                    break;
                case 7:
                    dao.delStu();
                    break;
                default:
                    System.exit(0);

            }
        }
    }

}
